package com.iplant.ams.service.po.dms.scada.conf;

import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;

@DBBasePO(TableName = "dms_position", Schemas = DBSchemas.AMS, CheckName = {"Code", "AreaID,Name"}, CodeAuto = true,
        CodePrefix = "DMS-Position-", CodeNum = 4)
public class DMSPosition extends BasePO implements Serializable {
    private static final long serialVersionUID = 1L;

    @DBCondition
    @DBField
    public int AreaID = 0;
    @DBJoin(name = "Name", tableName = "fmc_workarea", tableAsName = "area1", MainTableField = "AreaID", Schemas = DBSchemas.Basic)
    public String AreaName = "";

    @JsonProperty("AreaID")
    public int getAreaID() {
        return AreaID;
    }

    public void setAreaID(int areaID) {
        AreaID = areaID;
    }

    @JsonProperty("AreaName")
    public String getAreaName() {
        return AreaName;
    }

    public void setAreaName(String areaName) {
        AreaName = areaName;
    }
}
